﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModifyPwd.aspx.cs" Inherits="Admin.User.ModifyPwd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>修改密码</title>
    <link href="/Admin/Css/rightbar.css?FileVersion=<%= FileVersion %>" rel="stylesheet"
        type="text/css" />
    <script src="/Admin/Scripts/Check.js?FileVersion=<%= FileVersion %>" type="text/javascript"></script>
    <script src="/Admin/Scripts/jquery-1.4.1.min.js?FileVersion=<%= FileVersion %>" type="text/javascript"></script>
</head>
<body id="wallet">
    <div class="warp">
        <div class="topnav">
            <ul>
                <li><a href="javascript:void(0);" style="cursor: default;" class="on_nav"><span>修改密码</span></a></li>
            </ul>
        </div>
        <div class="tab mt15">
            <ul>
                <li class="in_on"><strong>修改密码</strong></li>
                <li class="caution01">带 <span class="org">*</span> 号为必填项目</li>
            </ul>
        </div>
        <div class="cont" style="padding-top: 8px;" id="stb8">
            <form id="form1" name="form1" action="ModifyPwd.aspx?action=modify" method="post">
            <table width="660" border="0" cellspacing="0" cellpadding="0" class="tb01">
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>旧 密 码：
                    </td>
                    <td align="left" valign="top">
                        <input type="password" id="txtOldPwd" name="txtOldPwd" need="旧密码不能为空！" class="srk"
                            size="20" maxlength="50" /><span class="gray pl10"><label id="lblHint1">密码字母有大小写区分。<span
                                class="org">6－16</span>个字符，限用英文或数字。</label></span>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>新 密 码：
                    </td>
                    <td align="left" valign="middle">
                        <input type="password" id="txtNewPwd" name="txtNewPwd" need="新密码不能为空！" class="srk"
                            size="20" maxlength="50" /><span class="gray pl10">请输入您的新密码</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>确认密码：
                    </td>
                    <td align="left" valign="top">
                        <input type="password" id="txtNewPwdAgain" name="txtNewPwdAgain" need="确认密码不能为空！"
                            class="srk" size="20" maxlength="50" /><span class="gray pl10">请重新输入一遍您的新密码</span>
                    </td>
                </tr>
            </table>
            </form>
        </div>
        <div class="btudiv">
            <ul style="width: 200px;">
                <li><a id="A1" class="btuyellow_arrow" style="height: 31px;" onclick="return CheckForm();"
                    href="#"><span>修 改</span> </a></li>
                <li><a class="btublue" style="height: 31px;" href="javascript:void(0);" onclick="form1.reset();return false;">
                    <span>重 置</span></a></li>
            </ul>
        </div>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#txtOldPwd").focus();
        });

        function CheckForm() {
            var obj = document.form1.elements;
            if (!checkAttr(obj)) {
                return false;
            }
            if ($("#txtNewPwd").val() == '123123' || $("#txtNewPwd").val() == '111111' || $("#txtNewPwd").val() == 'abcabc' || $("#txtNewPwd").val() == '123456' || $("#txtNewPwd").val() == '654321') {
                alert("您输入的密码太过简单！");
                return false;
            }
            var pattern = /^[a-zA-Z0-9]{5,15}$/;
            if (!pattern.test($("#txtNewPwd").val())) {
                alert("新密码只能为6-16个字母或数字的组合！");
                $("#txtNewPwd").focus();
                return false;
            }
            if ($("#txtNewPwd").val() != $("#txtNewPwdAgain").val()) {
                alert("您两次输入的密码不一致！");
                $("#txtNewPwd").focus();
                return false;
            }
            $("#form1").submit();
            return true;
        }
    </script>
</body>
</html>
